package ch.unisi.inf.java.project.riskbami.model;

import java.util.ArrayList;

/**
 * The test class CountryTest.
 * 
 * @author minellir@lu.unisi.ch
 * @author babazadm@lu.unisi.ch
 */
public class GameTest extends junit.framework.TestCase
{
 

	public final void testGetOwnerOf()
	{
		Player player1 = new Human("PincoPallino", null);
		Country country1 = new Country("Italia");
		ArrayList<Player> players = new ArrayList<Player>(1);
		players.add(player1);
		player1.addOwnedCountry(country1);
		assertEquals(player1, new Game(players).getOwnerOf(country1));
	}
	
	public final void testGetCountries()
	{
		final Country country1 = new Country("Italia");
		final Country country2 = new Country("Svizzera");
		final Country country3 = new Country("Francia");
		final Country country4 = new Country("Ucraina");
		ArrayList<Player> players = new ArrayList<Player>(1);
		players.add(new Human("n", null));
		final Game game = new Game(players);
		final ArrayList<Country> listOfCountries = new ArrayList<Country>();
		listOfCountries.add(country1);
		listOfCountries.add(country2);
		listOfCountries.add(country3);
		listOfCountries.add(country4);
		game.addAllCountries(listOfCountries);
		assertEquals(listOfCountries, game.getCountries());
	}
}

